package com.sakiko.integration.controller;

import dev.langchain4j.model.chat.ChatModel;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * projectName: com.sakiko.integration.controller
 *
 * @author: Yang
 * description: 低阶整合
 * time: 2025/8/17 11:05
 */
@RestController
public class PopularIntegrationController {
    @Resource
    private ChatModel chatModel;

    @GetMapping("/boot/popular")
    public String chat(@RequestParam(value = "prompt", defaultValue = "今天天气很好啊，怎么说") String prompt) {
        return chatModel.chat(prompt);
    }
}
